package com.baizhi.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    private Integer userId;
    private String telephone;
    private String password;
    private String userImage;
    private String userNickname;
    private String userName;
    private String sex;
    private String autograph;
    private String province;
    private String city;
    private Integer guruId;
    private Guru guru;
    private Integer status;
    @JsonFormat(pattern = "yyyy-MM-dd ")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date createDate;

    public User(Integer userId, String telephone, String password, String userImage, String userNickname, String userName, String sex, String autograph, String province, String city,Guru guru, Integer status, Date createDate) {
        this.userId = userId;
        this.telephone = telephone;
        this.password = password;
        this.userImage = userImage;
        this.userNickname = userNickname;
        this.userName = userName;
        this.sex = sex;
        this.autograph = autograph;
        this.province = province;
        this.city = city;
        this.guru = guru;
        this.status = status;
        this.createDate = createDate;
    }

    public User(Integer userId, String telephone, String password, String userImage, String userNickname, String userName, String sex, String autograph, String province, String city, Integer guruId,Integer status, Date createDate) {
        this.userId = userId;
        this.telephone = telephone;
        this.password = password;
        this.userImage = userImage;
        this.userNickname = userNickname;
        this.userName = userName;
        this.sex = sex;
        this.autograph = autograph;
        this.province = province;
        this.city = city;
        this.guruId = guruId;
        this.status = status;
        this.createDate = createDate;
    }
}
